package com.jic.order.enums;

public enum DistributorEnum {
    EMS(1, "EMS"),
    YUN_DA(2, "韵达");

    private Integer code;

    private String message;

    DistributorEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static DistributorEnum getByCode(Integer code){
        DistributorEnum[] values = DistributorEnum.values();
        for(DistributorEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
